package com.zhoug.chart3.core.styleconfig;

import com.zhoug.chart3.MPChartColors;

/**
 * @Author: zhoug
 * @Date: 2024-02-18
 * @Description:
 */
public class MPRadarStyleConfig extends MPStyleConfig implements IMPRadarStyleConfig {
    private int radarColor;
    private int[] fillColors;
    private int fillAlpha=88;


    /**
     * 数据顶点连接线的颜色
     *
     * @param radarColor
     */
    @Override
    public void setRadarColor(int radarColor) {
       this.radarColor=radarColor;
    }

    /**
     * 数据顶点连接线的颜色
     *
     * @return
     */
    @Override
    public int getRadarColor() {
        if(radarColor==0){
            radarColor= MPChartColors.COLOR_BLUE;
        }
        return radarColor;
    }

    @Override
    public int[] getFillColors() {
        return fillColors;
    }

    @Override
    public void setFillColors(int[] fillColors) {
        this.fillColors = fillColors;
    }

    /**
     * 填充色透明度
     *
     * @param fillAlpha
     */
    @Override
    public void setFillAlpha(int fillAlpha) {
        if(fillAlpha<0){
            fillAlpha=0;
        }else if(fillAlpha>255){
            fillAlpha=255;
        }
        this.fillAlpha=fillAlpha;
    }

    /**
     * 填充色透明度
     *
     * @return
     */
    @Override
    public int getFillAlpha() {
        return  this.fillAlpha;
    }

    @Deprecated
    @Override
    public void setOneScreen(int oneScreen) {
        super.setOneScreen(oneScreen);
    }
    @Deprecated
    @Override
    public void setAutoScaleMax(boolean autoScaleMax) {
        super.setAutoScaleMax(autoScaleMax);
    }
    @Deprecated
    @Override
    public int getOneScreen() {
        return super.getOneScreen();
    }
    @Deprecated
    @Override
    public boolean isAutoScaleMax() {
        return super.isAutoScaleMax();
    }
}
